<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/8
 * Time: 11:41
 */

echo "<title>6-4 条件结构之if…else if…else… </title>";
echo "<p style='text-align: center'><a href=\"index.php\"><font size=\"4\">目录</font></a></p>";
header("Content-type: text/html; charset=utf-8");
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";

date_default_timezone_set('asia/shanghai');
$week = date('w');//获取当天星期几
$info = "";//提示信息
if($week == 1){
    $info = "上午有课";
}else if($week == 3){
    $info = "下午有课";
}else{
    $info = "今天没课";
}
    echo $info;//输出提示信息
